#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

int judge_s(char a[], char b[], int sz1, int sz2)
{
	if (sz1 != sz2)
		return 0;
	int i = 0;
	char s[256] = { 0 };
	for (i; i <= sz1 / sz2; i++)
	{
		int j = 0;
		strcpy(s, b);
		char tmp = s[0];
		for (j; j < sz1-1; j++)
		{
			s[j] = s[j + 1];
		}
		s[sz1 - 1] = tmp;
	}
	if (strcmp(s,a))
		return 1;
	else
		return 0;

}
int main()
{
	char a[] = "abcdef";
	char b[] = "defabc";
	int sz1 = strlen(a);
	int sz2 = strlen(b);
	printf("%d\n",judge_s(a, b, sz1, sz2));

	return 0;
}